package aggregation

import (
	"context"
	"git.mycaigou.com/gfyx/micro-gfyx-api/infrastructure/dto/aggregation"
	aggregationRepo "git.mycaigou.com/gfyx/micro-gfyx-api/infrastructure/repository/aggregation"
)

type statisticsService struct {
	statisticsRepo aggregationRepo.StatisticsRepositoryIface
}

// NewStatisticsService
// 统计管理服务
func NewStatisticsService(statisticsRepo aggregationRepo.StatisticsRepositoryIface) StatisticsServiceIface {
	return &statisticsService{
		statisticsRepo: statisticsRepo,
	}
}

func (s *statisticsService) UseRankList(ctx context.Context, param *aggregation.UseRankListParam) (*aggregation.UseRankListData, error) {
	return s.statisticsRepo.UseRankList(ctx, param)
}

func (s *statisticsService) Data(ctx context.Context, param *aggregation.DataParam) (*aggregation.StatisticsData, error) {
	return s.statisticsRepo.Data(ctx, param)
}
